package com.kingdee.eas.custom.bpmworkflow.cbbill.finanContractBill;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;



public abstract class AbstractCreditContractRequestFacadeControllerBean extends AbstractBizControllerBean implements CreditContractRequestFacadeController
{
    protected AbstractCreditContractRequestFacadeControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("7B9BFE21");
    }

    public String _createBillXML(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("efe2b964-2add-45ac-aaeb-8d41ac5525bf"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__createBillXML(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __createBillXML(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public void _saveBPMWorkFlow(Context ctx, String billId, String procInstId, String procURL, String success) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("30f712b8-41b3-47c5-97f7-169ec29e6369"), new Object[]{ctx, billId, procInstId, procURL, success});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __saveBPMWorkFlow(ctx, billId, procInstId, procURL, success);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __saveBPMWorkFlow(Context ctx, String billId, String procInstId, String procURL, String success) throws BOSException
    {    	
        return;
    }

    public String _startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("6e2659c8-bfe1-468f-b97c-08289d7f0b73"), new Object[]{ctx, billId, type});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__startBPMWorkFlow(ctx, billId, type);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __startBPMWorkFlow(Context ctx, String billId, String type) throws BOSException
    {    	
        return null;
    }

    public String _stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("32fb967d-1cde-4a14-9137-aa4b094c8e02"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__stopBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __stopBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

    public void _updateBillState(Context ctx, String billId, int state, String auditorNum) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d09ef122-b42c-44f4-bebf-a4fb258bddfa"), new Object[]{ctx, billId, new Integer(state), auditorNum});
            invokeServiceBefore(svcCtx);
              if(!svcCtx.invokeBreak()) {
            __updateBillState(ctx, billId, state, auditorNum);
            }
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected void __updateBillState(Context ctx, String billId, int state, String auditorNum) throws BOSException
    {    	
        return;
    }

    public String _viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("846782ea-3af0-415a-b36b-3e422bee5b42"), new Object[]{ctx, billId});
            invokeServiceBefore(svcCtx);
            if(!svcCtx.invokeBreak()) {
            String retValue = (String)__viewBPMWorkFlow(ctx, billId);
            svcCtx.setMethodReturnValue(retValue);
            }
            invokeServiceAfter(svcCtx);
            return (String)svcCtx.getMethodReturnValue();
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected String __viewBPMWorkFlow(Context ctx, String billId) throws BOSException
    {    	
        return null;
    }

}